package com.example.client;

import com.example.entity.TOrder;
import com.hzit.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "order",fallbackFactory = OrderClientFactory.class)
public interface OrderClient {
    @GetMapping("/tOrder/list")
    R<List<TOrder>> list();

    @PostMapping("/tOrder/add")
    R add(@RequestBody TOrder order);

    @PutMapping("/tOrder/update")
    R update(@RequestBody TOrder order);

    @DeleteMapping("/tOrder/delete/{id}")
    R delete(@PathVariable Integer id);
    //获取端口号
    @GetMapping("/tOrder/tOrder/getPort")
    R getPort();
}
